package quanly;

import java.awt.Button;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.Label;
import java.awt.Panel;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class quanly extends Frame implements ActionListener{
		Button btql, bttt, bttk,btc,btexit;
		TextField txtmay, txttien;
		Label lb1,lbmay,lbtien;
		Panel pn1,pn2,pn,pn3;
		public void GUI(){
			lb1=new Label("CHƯƠNG TRÌNH QUẢN LÝ TIỆM NET");
			lbmay=new Label("SỐ MÁY");
			lbtien=new Label("SỐ TIỀN");
			txtmay=new TextField("");
			txttien=new TextField("");
			btql=new Button("QUẢN LÝ");
			bttt=new Button("TÍNH TIỀN");
			btc=new Button("CHI TIẾT");
			bttk=new Button("THỐNG KÊ");
			btexit=new Button("THOÁT");
			btql.addActionListener(this);
			bttt.addActionListener(this);
			btc.addActionListener(this);
			bttk.addActionListener(this);
			btexit.addActionListener(this);
			pn=new Panel(new GridLayout(3, 1));
			pn1=new Panel(new FlowLayout());
			pn2=new Panel(new GridLayout(2, 2));
			pn3=new Panel(new FlowLayout());
			pn1.add(lb1);
			pn2.add(lbmay); pn2.add(txtmay);
			pn2.add(lbtien); pn2.add(txttien);
			pn3.add(btql); pn3.add(bttt); pn3.add(btc); pn3.add(bttk); pn3.add(btexit);
			pn.add(pn1); pn.add(pn2); pn.add(pn3);
			add(pn);
			setSize(400	, 300);
			show();
		}
	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		if(e.getSource()==btexit)
			System.exit(0);
	}
	public quanly(String st){
		super(st);
		GUI();
	}
	public static void main(String[] avg){
	new quanly(" Quản Lý Tiệm NET ");
	}
}
